var a=document.body;
var b=document.documentElement;
var WindowWidth=a.clientWidth || b.clientWidth;
var WindowHeight=a.clientHeight || b.clientHeight;
var PageWidth=a.scrollWidth || b.scrollWidth;
var PageHeight=a.scrollHeight || b.scrollHeight;
var RowOffset=a.offsetWidth || b.offsetWidth;
var ColOffset=a.offsetHeight || b.offsetHeight;

var tag=document.getElementById('div');
var ScrollLeft=tag.scrollLeft;
var ScrollTop=tag.scrollTop;
var OffsetLeft=tag.offsetLeft;
var OffsetTop=tag.offsetTop;
